package Others;

import java.util.ArrayList;
import java.util.List;

public class _412_FizzBuzz {
    public List<String> fizzBuzz(int n) {
        List<String> results = new ArrayList<>();
        for(int i=1;i<=n;i++) {
            String temp = "";
            if (i % 3 == 0) {
                temp += "Fizz";
            }
            if (i % 5 == 0) {
                temp += "Buzz";
            }
            if (temp.equals("")) {
                temp = i + "";
            }
            results.add(temp);
        }
        return results;
    }
}
